<style>
.row-main,.notification-main{
	height:1300px;
}
</style>
<div class="notification-main">
	<div class="History-box">
	  <h1 class="title">Bidding History</h1>

<?php
 $this->widget('zii.widgets.grid.CGridView', 
  array(
  'id'=>'bidding-grid',
  'dataProvider'=>$bidhistory->search_my(),
  // 'filter'=>$model,
  'template'=>"{items}\n{summary}\n{pager}",


  'columns'=>array(
        array(
            'name'=>'auction_id',
            'header'=>'Auction Id'
        ),
	    array(
	      'name'=>'title',
	      'type'=>'raw',
	      'value' =>function($data){
	               $content="";
	               $title=BidHistory::getTitle($data);
	               if (!empty($data->auction_id)){
	                   $content=CHtml::link(
	                       $title,
	                       AuctionInfo::getDetailUrl($title, $data->auction_id),
	                       [
	                           "target"=>"_blank"
	                       ]
	                   );
	               }else{
	                   $content=$title;
	               }
	               return $content;
	           }
	      ),
	    array(
	      'name'=>'Date and Time',
	      'value' =>  function($data){ return date('Y-m-d H:i:s',$data->created);},
	      ),
		array(
			'name'=>'amount',
			'value' => '$data->amount'
		),
		//日后待完善
	    array(
	      'name'=>'type',
	      'value' => '$data->bid_type'
	      ),
	),))?>
	</div>
</div>